import request from "@/utils/request"

// 添加文章分类接口
interface NewsCate{
  cate_alias:string,
  cate_name:string
}
export const addNewsCate=(data:NewsCate)=>request({
  url:"/my/cate/add",
  method:"post",
  data
})
// 获取文章分类列表接口
export const getCateList=()=>request({
  url:"/my/cate/list",
  method:"get"
})

// 修改文章分类接口
  interface Iform{
    cate_name:string,
    cate_alias:string,
    id:number
  }
export const updateCate=(data:Iform)=>request({
  url:"/my/cate/info",
  method:"put",
  data
})

// 删除接口
export const deleteCate=(id:number)=>request({
  url:"/my/cate/del",
  method:"delete",
  params:{
     id
  }
})